package org.sixtynine.stock.result;

public class Result {

	/** company code */
	private String ticker;
	private String companyName;

	public String getTicker() {
		return ticker;
	}

	public void setTicker(String ticker) {
		this.ticker = ticker;
	}

	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	public String getShortCompanyCode() {
		String comShortCode = null;
		if (ticker.contains(".")) {
			comShortCode = ticker.substring(0, ticker.indexOf("."));
		}
		if (comShortCode != null) {
			return comShortCode;
		} else {
			return ticker;
		}
	}

}
